import { handleApiResponse } from "@/utils/request.js";
import {
    GetBrandList,
    GetGoodsTotalCategory,
    GetGoodsCategory,
    GetGoodsTypeList,
} from '../../wailsjs/go/api/GoodsApi.js'

// 获取品牌列表
export function selectBrandList(params) {
    return handleApiResponse(() => GetBrandList(params))
}

// 获取商品种类
export function selectGeneralList() {
    return handleApiResponse(() => GetGoodsTotalCategory())
}

// 获取商品分类
export function selectCategoryList(params) {
    return handleApiResponse(() => GetGoodsCategory(params))
}

// 获取商品类型列表
export function selectTypeList(params) {
    return handleApiResponse(() => GetGoodsTypeList(params))
}